<?php if(!defined('IN_DISCUZ')) exit('Access Denied'); hookscriptoutput('invite');
0
|| checktplrefresh('./template/default/common/invite.htm', './template/default/common/simplesearchform.htm', 1307285253, '1', './data/template/1_1_common_invite.tpl.php', './template/default', 'common/invite')
;?><?php include template('common/header'); if(!$_G['inajax']) { ?>
<div id="pt" class="bm cl"><?php if($_G['setting']['search']) { ?><?php $slist = array();?><?php if($_G['fid'] && $_G['forum']['status'] != 3 && $mod != 'group') { ?><?php
$slist[forumfid] = <<<EOF
<li><a href="javascript:;" rel="curforum" class="curtype">本版</a></li>
EOF;
?><?php } if($_G['setting']['portalstatus'] && $_G['setting']['search']['portal']['status'] && ($_G['group']['allowsearch'] & 1 || $_G['adminid'] == 1)) { ?><?php
$slist[portal] = <<<EOF
<li><a href="javascript:;" rel="article"
EOF;
 if(CURSCRIPT == 'portal') { 
$slist[portal] .= <<<EOF
 class="curtype"
EOF;
 } 
$slist[portal] .= <<<EOF
>文章</a></li>
EOF;
?><?php } if($_G['setting']['search']['forum']['status'] && ($_G['group']['allowsearch'] & 2 || $_G['adminid'] == 1)) { ?><?php
$slist[forum] = <<<EOF
<li><a href="javascript:;" rel="forum"
EOF;
 if((CURSCRIPT == 'forum' && !$_G['fid']) || (CURSCRIPT == 'home' && in_array($do, array('thread', 'activity', 'poll', 'reward', 'debate', 'trade')))) { 
$slist[forum] .= <<<EOF
 class="curtype"
EOF;
 } 
$slist[forum] .= <<<EOF
>帖子</a></li>
EOF;
?><?php } if($_G['setting']['homestatus'] && $_G['setting']['search']['blog']['status'] && ($_G['group']['allowsearch'] & 4 || $_G['adminid'] == 1)) { ?><?php
$slist[blog] = <<<EOF
<li><a href="javascript:;" rel="blog"
EOF;
 if(CURSCRIPT == 'home' && $do == 'blog') { 
$slist[blog] .= <<<EOF
 class="curtype"
EOF;
 } 
$slist[blog] .= <<<EOF
>日志</a></li>
EOF;
?><?php } if($_G['setting']['homestatus'] && $_G['setting']['search']['album']['status'] && ($_G['group']['allowsearch'] & 8 || $_G['adminid'] == 1)) { ?><?php
$slist[album] = <<<EOF
<li><a href="javascript:;" rel="album"
EOF;
 if(CURSCRIPT == 'home' && $do == 'album') { 
$slist[album] .= <<<EOF
 class="curtype"
EOF;
 } 
$slist[album] .= <<<EOF
>相册</a></li>
EOF;
?><?php } if($_G['setting']['groupstatus'] && $_G['setting']['search']['group']['status'] && ($_G['group']['allowsearch'] & 16 || $_G['adminid'] == 1)) { ?><?php
$slist[group] = <<<EOF
<li><a href="javascript:;" rel="group"
EOF;
 if(CURSCRIPT == 'group' || $_G['basescript']=='group') { 
$slist[group] .= <<<EOF
 class="curtype"
EOF;
 } 
$slist[group] .= <<<EOF
>{$_G['setting']['navs']['3']['navname']}</a></li>
EOF;
?><?php } ?><?php
$slist[user] = <<<EOF
<li><a href="javascript:;" rel="user"
EOF;
 if(CURSCRIPT == 'home' && !in_array($do, array('blog', 'album', 'thread', 'activity', 'poll', 'reward', 'debate', 'trade'))) { 
$slist[user] .= <<<EOF
 class="curtype"
EOF;
 } 
$slist[user] .= <<<EOF
>用户</a></li>
EOF;
?>
<?php if($slist) { ?>
<div id="sc" class="y">
<form id="sc_form" method="post" autocomplete="off" onsubmit="searchFocus($('srchtxt'))" action="<?php echo $_G['siteurl'];?>search.php?searchsubmit=yes" target="_blank">
<input type="hidden" name="formhash" value="<?php echo FORMHASH;?>" />
<input type="hidden" name="mod" id="sc_mod" value="title" />
<input type="hidden" name="srhfid" value="<?php echo $_G['fid'];?>" />
<input type="hidden" name="srhlocality" value="<?php echo $_G['basescript'];?>::<?php echo $_G['gp_do'];?>" />
<table cellspacing="0" cellpadding="0">
<tr>
<td id="sc_txt_td"><input type="text" name="srchtxt" id="sc_txt" class="px z" value="请输入搜索内容" autocomplete="off" /></td>
<td id="sc_type_td"><span id="sc_type_w" class="px z"><a href="javascript:;" id="sc_type" class="showmenu xg1" onclick="showMenu(this.id);">搜索</a></span></td>
<td id="sc_btn_td"><button type="submit" name="searchsubmit" id="sc_btn" class="pn pnc" value="true"><strong>搜索</strong></button></td>
</tr>
</table>
<div id="sc_type_menu" class="p_pop cl" style="display: none">
<ul><?php echo implode('', $slist);; ?></ul>
</div>
</form>
<script type="text/javascript">initSearchmenu('sc');</script>
</div>
<?php } } ?><div class="z"><a href="./" class="nvhm" title="首页"><?php echo $_G['setting']['bbname'];?></a> <em>&rsaquo;</em> 邀请</div>
</div>
<div id="ct" class="wp cl">
<div class="mn">
<div class="bm bw0">
<h1 class="mt">邀请好友<?php echo $invitename;?></h1>
<div class="usd usd2">
<?php } else { ?>
<div id="main_messaqge">
<h3 class="flb">
<em id="returnmessage4">邀请好友<?php echo $invitename;?></em>
<span>
<?php if($_G['inajax']) { ?><a href="javascript:;" class="flbc" onclick="hideWindow('invite')" title="关闭">关闭</a><?php } ?>
</span>
</h3>
<div class="usd">
<?php } ?>
<ul class="cl">
<li>
<p>按好友用户名查找</p>
<p class="mtn"><input type="text" name="username" size="25" id="username" class="px" value="" autocomplete="off" /> <button class="pn pnc" onclick="clearlist=1;getUser();"><span>查找</span></button></p>
<script type="text/javascript">
var invitefs;
var clearlist = 0;
</script>
</li>
<li>
<p>按好友分组查找</p>
<p class="mtn">
<select class="ps" onchange="clearlist=1;getUser(1, this.value)">
<option value="-1">全部好友</option><?php if(is_array($friendgrouplist)) foreach($friendgrouplist as $groupid => $group) { ?><option value="<?php echo $groupid;?>"><?php echo $group;?></option>
<?php } ?>
</select>
</p>
</li>
</ul>
<div class="tbx">
<span class="y">还能选择(<strong id="remainNum">0</strong>)个</span>
<span id="showUser_0" onclick="invitefs.showUser(0)" class="a brs">全部好友</span>
<span id="showUser_1" onclick="invitefs.showUser(1)">已选(<strong id="selectNum">0</strong>)</span>
<span id="showUser_2" onclick="invitefs.showUser(2)">未选(<cite id="unSelectTab">0</cite>)</span>
</div>
</div>
<ul class="usl cl<?php if(empty($_G['inajax'])) { ?> usl2<?php } ?>" id="friends"></ul>
<script type="text/javascript" reload="1">
var page = 1;
var gid = -1;
var showNum = 0;
var haveFriend = true;
var username = '';
function getUser(pageId, gid) {
page = parseInt(pageId);
gid = isUndefined(gid) ? -1 : parseInt(gid);
username = $('username').value;
var x = new Ajax();
x.get('home.php?mod=spacecp&ac=friend&op=getinviteuser&inajax=1&page='+ page + '&gid=' + gid + '&username='+ username + '&' + Math.random(), function(s) {
var data = eval('('+s+')');
var singlenum = parseInt(data['singlenum']);
var maxfriendnum = parseInt(data['maxfriendnum']);
invitefs.addDataSource(data, clearlist);
haveFriend = singlenum && singlenum == 20 ? true : false;
if(singlenum && invitefs.allNumber < 20 && invitefs.allNumber < maxfriendnum && maxfriendnum > 20 && haveFriend) {
page++;
getUser(page);
}
});
}
function selector() {
var parameter = {'searchId':'username', 'showId':'friends', 'formId':'inviteform', 'showType':1, 'handleKey':'invitefs', 'maxSelectNumber':'20', 'selectTabId':'selectNum', 'unSelectTabId':'unSelectTab', 'maxSelectTabId':'remainNum'};
invitefs = new friendSelector(parameter);
<?php if($inviteduids) { ?>
invitefs.addFilterUser([<?php echo $inviteduids;?>]);
<?php } ?>
var listObj = $('friends');
listObj.onscroll = function() {
clearlist = 0;
if(this.scrollTop >= (this.scrollHeight/5-5)) {
page++;
gid = isUndefined(gid) ? -1 : parseInt(gid);
if(haveFriend) {
getUser(page, gid);
}
}
}
getUser(page);
}
if($('friendselector_js')) {
selector();
} else {
var scriptNode = document.createElement("script");
scriptNode.id = 'friendselector_js';
scriptNode.type = "text/javascript";
scriptNode.src = '<?php echo $_G['setting']['jspath'];?>home_friendselector.js?<?php echo VERHASH;?>';
if(BROWSER.ie) {
scriptNode.onreadystatechange = function () {
if(scriptNode.readyState == 'loaded' || scriptNode.readyState == 'complete') {
selector();
}
}
} else {
scriptNode.onload = selector;
}
$('append_parent').appendChild(scriptNode);
}
</script>
<form method="post" autocomplete="off" name="invite" id="inviteform" action="misc.php?mod=invite&amp;action=<?php echo $_G['gp_action'];?>&amp;id=<?php echo $_G['gp_id'];?>">
<input type="hidden" name="formhash" value="<?php echo FORMHASH;?>" />
<input type="hidden" name="referer" value="<?php echo dreferer(); ?>" />
<?php if(!empty($_G['inajax'])) { ?><input type="hidden" name="handlekey" value="<?php echo $_G['gp_handlekey'];?>" /><?php } ?>
<p class="o pns<?php if(empty($_G['inajax'])) { ?> mtw<?php } ?>"><button type="submit" class="pn pnc" name="invitesubmit" value="yes"><strong>发送邀请</strong></button></p>
</form>
</div>
<?php if(!$_G['inajax']) { ?>
</div>
</div>
<?php } include template('common/footer'); ?>